<template>
  <div class="pre-screening-results">
    <van-nav-bar title="受理结果" left-arrow @click-left="$router.back()"/>
    <div class="resultsStatus">
      <img v-if="progress == '00'" :src="require(`@/assets/public/accepting-status-icon.png`)" />
      <img v-if="progress == '01'" :src="require(`@/assets/public/tobesigned-status-icon.png`)" />
      <van-icon v-if="progress == '02'" name="checked"/>
      <van-icon v-if="progress == '03'" name="clear"/>
      <p class="title" style="margin-top: 0;" v-if="progress == '00'">受理中</p>
      <p class="title" style="margin-top: 0;" v-if="progress == '01'">待签约</p>
      <p class="title" v-if="progress == '02'">已完成</p>
      <p class="title" v-if="progress == '03'">已拒绝</p>
      <p class="refuseTip" v-if="progress == '00'">您的贷款申请我行正在受理中，稍后会有客户经理和您取得联系，也可以联系客户经理了解详情，联系方式:15900000000</p>
      <p class="refuseTip" v-if="progress == '01'">您的贷款申请我行正在受理中，稍后会有客户经理和您取得联系，您也可以联系客户经理了解详情，联系方式:15900000000</p>
      <p class="refuseTip" v-if="progress == '02'">您在我行的贷款申请已通过，已完成签约，可通过小程序或者手机银行进行“提款”操作，祝您生活愉快。</p>
      <p class="refuseTip" v-if="progress == '03'">很抱歉通知您，根据您的咨询情况，您暂未符合我行贷款申请要求，敬请谅解。详情联系客户经理15900000000</p>
    </div>
    <div class="btn-group">
      <div class="btn">
        <router-link :to="{ path:'/loanPage/newHome' }">返回</router-link>
      </div>
      <div class="btn btn-primary" v-if="progress == '01'">
        <router-link :to="{ path:'/loanPage/newHome' }">去签约</router-link>
      </div>
    </div>
    <div class="steps-status">
      <van-steps v-if="progress == '00'" direction="vertical" finish-icon="checked" inactive-icon="circle" active-icon="checked" active-color="#86909C">
        <van-step>
          <div class="step-li">
            <div>提交申请</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
        <van-step>
          <div class="step-li">
            <div>受理中</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
      </van-steps>
      <van-steps v-if="progress == '01'" direction="vertical" finish-icon="checked" inactive-icon="circle" active-icon="checked" :active="1" active-color="#86909C">
        <van-step>
          <div class="step-li">
            <div>提交申请</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
        <van-step>
          <div class="step-li">
            <div>已审核</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
        <van-step>
          <div class="step-li">
            <div>待签约</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
      </van-steps>
      <van-steps v-if="progress == '02'" direction="vertical" finish-icon="checked" inactive-icon="checked" active-icon="checked" :active="2" active-color="#86909C">
        <van-step>
          <div class="step-li">
            <div>提交申请</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
        <van-step>
          <div class="step-li">
            <div>已审核</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
        <van-step>
          <div class="step-li">
            <div>签约完成</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
      </van-steps>
      <van-steps v-if="progress == '03'" direction="vertical" finish-icon="checked" inactive-icon="checked" active-icon="clear" :active="1" active-color="#86909C">
        <van-step>
          <div class="step-li">
            <div>提交申请</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
        <van-step>
          <div class="step-li">
            <div>已拒绝</div>
            <p>2023-12-17  23:34:56</p>
          </div>
        </van-step>
      </van-steps>
    </div>
  </div>
</template>

<script>
export default {
  name: "applyStatus",
  data: function () {
    return {
      progress: '',  //00受理中 01待签约 02已完成 03已拒绝
    }
  },
  created: function () {
    this.progress = this.$route.query.progress;
  },
}
</script>

<style scoped lang="less">
/deep/.van-nav-bar{
  .van-nav-bar__content{
    height: 4.4rem;
    line-height: 2rem;
    .van-icon{
      color: rgb(50, 50, 51);
      font-size: 2rem;
    }
    .van-nav-bar__title{
      font-size: 1.8rem;
    }
  }
}
[class*=van-hairline]::after{
  border: 0;
}
.content_box {
  margin: 5.8rem 0rem 0rem 0rem;
}

.pre-screening-results {
  font-size: 1.3rem;
  line-height: 2rem;
  font-family: PingFang SC-Regular, PingFang SC;
  font-weight: 400;
  color: #86909C;
  background-color: #FFFFFF;
  height: 100vh;
  position: relative;
}

.pre-screening-results .resultsStatus {
  padding: 4rem;
  text-align: center;
}

.pre-screening-results .resultsStatus img{
  width: 7.5rem;
}

.pre-screening-results .refuseTip {
  text-align: left;

}

.pre-screening-results .van-icon-clear {
  color: #FE5D3D !important;
  font-size: 6rem;
}

.pre-screening-results .van-icon-checked {
  color: #61D243 !important;
  font-size: 6rem;
}

.pre-screening-results .title {
  font-size: 2rem;
  color: #4E5969;
  margin: 1.6rem;
}

.pre-screening-results .btn-group {
  display: flex;
  justify-content: center;
}

.pre-screening-results .btn {
  width: 30%;
  padding: 6px 0;
  font-size: 1.4rem;
  font-weight: 400;
  text-align: center;
  border-radius: 4.4rem;
  margin: 0 0.8rem;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.pre-screening-results .btn a {
  color: var(--primary-color);
}

.pre-screening-results .btn-primary {
  color: #ffffff;
  border: 1px solid var(--primary-color);
  background: var(--primary-color);
}

.pre-screening-results .btn-primary a {
  color: #ffffff;
}
.steps-status{
  background-color: rgba(244, 246, 248, 0.8);
  border-radius: 1rem;
  margin: 4.4rem 1.6rem 0;
  /deep/.van-steps{
    background-color: transparent;
    .van-step{
      color: #86909C;
      padding-top: 14px;
      .van-icon-clear, .van-icon-circle{
        color: #F53F3F!important;
      }
    }
    .van-step--vertical .van-step__line {
      top: 26px;
      left: -15px;
      width: 1px;
      height: calc(~'100% - 13px');
    }
  }
  .step-li{
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    line-height: 1.4rem;
    div{
      color: #4E5969;
    }
    p{
      color: #86909C;
    }
  }
}
</style>
